package com.acoreful.bootsample.event.core.publish;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Component;

import com.acoreful.bootsample.event.core.MsgEvent;

@Component
public class EventPublish {
	@Autowired
	ApplicationContext context;
	
	public void publish(String message) {
        context.publishEvent(new MsgEvent(this, message));
    }
}
